package com.gyc.simple.sysuser.thread;

public class LoginServlet {

    private static String usernameref;
    private static String passwordref;

    synchronized public static void doPost(String username,String password){
        try {
            usernameref = username;
            if("a".equals(usernameref)){
                Thread.sleep(5000);
            }
            passwordref = password;
            System.out.println("username:"+usernameref+"  password:"+passwordref);
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
